/*
 * Copyright 2009 Armando Blancas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package samples;

import taskgraph.Config;

/**
 * Sample use of a configuration file, like the included 'taskgraph.cfg',
 * which has the following settings:
 * 
 * buffer.capacity=50000
 * channel.capacity=42600
 * logger.base.name=org.eclipse
 * logger.config.file=superlog
 *
 * If that file is placed in the directory where this program is 
 * launched then the code below should print these values.
 * 
 * @author Armando Blancas
 */
public class ConfigSample {

	public static final void main(String args[]) {
		Config cfg = Config.get();
		
		System.out.printf("Config file: %s\nLogger Name: %s\nBuffer capacity: %d\nChannel capacity: %d\n",
			cfg.loggerConfig(), cfg.loggerName(), cfg.bufferCapacity(), cfg.channelCapacity());
	}

}
